<!doctype html>
<html>
<head>
<title>管理员列表页面</title>
    <?php $this->load->module('admin/index/page_header');?>
<link href="<?php echo URLPRE;?>static/admin/css/font_icon.css" rel="stylesheet" />
</head>
<body>
<div class="wrap J_check_wrap">
  <div class="nav">
      <ul>
          <li class="current"><a href="<?php echo site_url('admin/adminuser/index')?>">管理员管理</a></li> 
          <li><a href="<?php echo site_url('admin/adminuser/add')?>">添加管理员</a></li>    
      </ul>
  </div>
  <form method="post" action="<?php echo $index_url;?>">
    <div class="table_list" id="content">
        <div class="h_a">高级搜索</div>
        <table width="100%">
            <tbody>
            <tr>
                <td>
                    用户名：<input type="text" value="<?php echo $condition['name']?>" placeholder="名称" name="keywords" class="input rounded" size="20" />&nbsp;&nbsp;
                    角色：<select name="role_id">
                        <option value="0">选择角色</option>
                        <?php if(!empty($role_list)):?>
                            <?php foreach($role_list as $val):?>
                                <option<?php if($val['id']==$condition['role_id']):?> selected="selected"<?php endif;?> value="<?php echo $val['id'];?>"><?php echo $val['name'];?></option>
                            <?php endforeach;?>
                        <?php endif;;?>
                         </select>
                    部门：<select name="division_id" class="select rounded" style="font-family: 'Courier New', Courier, monospace;">
                        <option value="-1">全部</option>
                        <option value="0" <?php if($condition['division_id']==0)echo 'selected'?>>总部</option>
                        <?php echo $select_categorys;?>
                    </select>
                    <input type="submit" class="btn" value="搜索">
                </td>
            </tr>
            </tbody>
        </table>
      <table width="100%" data-uri="<?php echo site_url('admin/adminuser/ajax_status');?>">
        <thead>
		    <tr>
		        <td style="width:2%;">选择</td>
		        <td style="width:8%;">操作</td>
		        <td style="width:8%;">用户名</td>
		        <td style="width:8%;">所属角色</td>
                <td style="width:8%;">所属部门</td>
<!--		        <td style="width:8%;">E-mail</td>-->
		        <td style="width:8%;">手机号码</td>
		        <td style="width:8%;">状态</td>		        
                <td style="width:8%;">DIY</td>
		        <td style="width:8%;">最近登录IP</td>
		        <td style="width:8%;">最近登录时间</td>
		        <td style="width:8%;">管理员注册时间</td>
		    </tr>
        </thead>
	    <?php if($list):?>
	    <tbody>
	        <?php foreach($list as $val):?>
	        <tr>
		        <td style="width:2%;"><input type="checkbox" value="<?php echo $val['id'];?>" name="id[]"></td>
		        <td style="width:4%" class="btn_min">
		            <div class="operat hidden">
		                <a class="icon-cog action" href="javascript:;">处理</a>
		                <div class="menu_select">
		                    <ul>
		                        <li><a class="icon-pencil" href="<?php echo $val['edit_url'];?>">编辑</a></li>
                                <?php if(!$val['disable']){?>
                                <li><a class="icon-pencil" href="<?php echo $val['auth_url'];?>">编辑权限</a></li>
		                        <li><a class="icon-remove-2 doDel" href="javascript:;" data-uri="<?php echo $val['remove_url'];?>">删除</a></li>
		                        <?php }?>
                                <?php if($GLOBALS['sid']=='751')://镇江春秋需求?>
                                <li><a class="icon-pencil" href="<?php echo site_url('admin/adminuser/cash_info?id='.$val['id']);?>">资金管理</a></li>
                                <li><a class="icon-pencil" href="<?php echo site_url('admin/adminuser/cash_list?id='.$val['id']);?>">资金操作日志</a></li>
                                <?php endif;?>
		                    </ul>
		                </div>
		            </div>
		        </td>
		        <td><?php echo $val['name'];?></td>
		        <td style="width:6%;"><?php echo $val['role_name'];?></td>
                <td style="width:6%;"><?php echo $val['division_name'];?></td>			        
<!--		        <td style="width:4%;">--><?php //echo $val['email'];?><!--</td>-->
		        <td style="width:4%;"><?php echo $val['mobile'];?></td>
		        <td style="width:4%;">
		        <img class="pointer" data-id="<?php echo $val['id'];?>" style="cursor: pointer;" data-field="is_open" data-value="<?php echo $val['is_open'];?>" src="<?php echo URLPRE;?>static/admin/images/icons/icon_<?php echo $val['is_open'];?>.png" /></td>
                <td style="width:4%;">
                    <img class="pointer" data-id="<?php echo $val['id'];?>" style="cursor: pointer;" data-field="is_diy" data-value="<?php echo $val['is_diy'];?>" src="<?php echo URLPRE;?>static/admin/images/icons/icon_<?php echo $val['is_diy'];?>.png" /></td>
		        <td style="width:4%;"><?php echo $val['last_login_ip'];?></td>
		        <td style="width:4%;"><?php echo $val['last_login_time'];?></td>
		        <td style="width:4%;"><?php echo $val['add_time'];?></td>
	        </tr>
	        <?php endforeach;?>
	    </tbody>
	    <?php endif;?>
      </table>
    </div>
    <div class="btn_wrap">
      <div class="btn_wrap_pd">
      	<label class="mr20"><input class="icon-checkbox-checked icon-checkbox-unchecked" type="checkbox" title="全选" onClick="tools_select('id[]',this)" />全选</label>
        <button type="button" class="btn J_ajax_submit_btn" onClick="tools_submit({action:'<?php echo site_url('admin/adminuser/ajax_remove');?>',msg:'确定要删除该信息么?'})">删除</button>

      </div>
    </div>
  </form>
  <div class="page_nav">
  <?php echo $this->mypageclass->show(1); ?>
  </div>
</div>
<script type="text/javascript">
//$(function(){
//    $("#condition").on("click",function(){
//    	$("body").Condition({
//			input:"#condition_input",
//			okVal:'高级搜索',
//			callback:function(data){tools_submit({action:'<?php //echo site_url('admin/adminuser/index');?>//'});
//			},
//			data:{
//				'<?php //echo $this->db->dbprefix("admin_user").'.name';?>//':{name:'用户名'},
//				'<?php //echo $this->db->dbprefix("admin_user").'.email';?>//':{name:'E-mail'}
//			}
//    	})
//    });
//})
</script>
</body>
</html>